package com.api.shopapi.service;


import com.api.shopapi.entity.Order;
import com.api.shopapi.entity.OrderInfo;
import com.api.shopapi.entity.dto.OrderBusinessPersonalDTO;
import com.api.shopapi.entity.dto.OrderDTO;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * @author maochuan
 */
@Service
public interface OrderService {

    int insert(Order order);

    int update(Order order);

    int delete(String orderCode);

    List<Order> getList();

    Order getByOrderCode(String orderCode);

    List<Order> getByUserCode(String userCode);

    //订单统计
    PageInfo<OrderInfo> getOrderInfo(int pageIndex, int pageSize,
                                     String governmentCode, String zoneCode);

    PageInfo<OrderBusinessPersonalDTO> getOrderPersonal(int pageIndex, int pageSize,
                                                        String receiveName,String receivePhone,
                                                        String starTime,String endTime);

    List<Order> getOrderCreateTime(String elderlyCode, Date startTime, Date endTime);


}
